<?php
require_once('../system/myFunc.php');
   require_once('../system/dbConn.php');
  connect();
  $sql="select * from category";
  $cat_list=fetch_array($sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
	<title>家具管理系统</title>
</head>
<body>
<form method="post" action="doadd.php">
	<table border="1">
		<tr>
			<th>家具名称</th>
            <td><input type="text" name="sqh_name" id="sqh_name"></input></td>
		</tr>
		<tr>
		<th>家具类别</th>
			<td><select name="sqh_cid" id="sqh_cid" class="form-control">
			<?php

			foreach($cat_list as  $one){

				echo '<option value="'.$one['sqh_cid'].'">'.$one['sqh_cname'].'</option>';
			}
					//var_dump($cat_list);
			 ?>
			</select></td>
		</tr>
        
        <tr>
        <th>家具品牌</th>
        <td><input type="text" name="sqh_brand" id="sqh_brand"></input></td>
        </tr>

         <tr>
        <th>家具添加时间</th>
        <td><input type="date" name="sqh_adddate" id="sqh_adddate"></input></td>
        </tr>

        <tr>
        <th>家具图片</th>
        <td><input type="file" name="sqh_jiajulink" id="sqh_jiajulink"></input></td>
        </tr>

        <tr>
        <th>家具简介</th>
        <td><textarea name="sqh_intro" id="sqh_intro" cols="42" rows="10"></textarea></td>
        </tr>

        <tr>
     </table>   
        <td colspan="2">
        <input type="submit" value="添加"></input>
        <input type="reset" value="重置"></input>	
        </td>
        </tr>
	
</form>
</body>
</html>